#define _CRT_SECURE_NO_WARNINGS 1
int removeElement(int* nums, int val,int size) {
    int right = 0;
    int left = 0;
    for (right = 0; right < size; right++)
    {
        if (nums[right] != val)
        {
            nums[left] = nums[right];
            left++;

        }
    }
    return left;

}
int main()
{
    int a[10] = { 2,8,4,5,7,4,5,4,8,4 };
    int n = sizeof(a) / sizeof(a[0]);
    removeElement(a, 4, n);
    return 0;
}
